import {traverseTreeArr} from "@/common/utils"

export function getColSlots(item:TableColConfig,slots:ObjType){
    const colAllSlots:string[]=[],colSolts:string[]=[]
    traverseTreeArr([item],'childrenCols',(node)=>{colAllSlots.push(node.prop);colAllSlots.push(node.prop+'-header')})
    const hasSlots=Object.keys(slots)
    hasSlots.forEach(v=>{ if(colAllSlots.includes(v)) colSolts.push(v) })
    return colSolts
  }